package com.lemo.card;

import java.math.BigDecimal;

public class BankCard {

    private WifeListener wifeListener;

    private BigDecimal store = new BigDecimal(1000);

    public BigDecimal income(BigDecimal income) {
        if (wifeListener != null && income != null) {
            store = wifeListener.addEvent(new HusbandEvent(this), income);
        }
        return store;
    }

    public void addListener(WifeListener wifeListener) {
        this.wifeListener = wifeListener;
    }

    public BigDecimal getStore() {
        return store;
    }

    public void setStore(BigDecimal store) {
        this.store = store;
    }
}
